package com.jinzhi.jzweb.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import com.jinzhi.jzweb.pojo.entity.ChapterDocument;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 *
 * <pre>
 * 章节表
 * </pre>
 * <small> 2020-02-24 21:04:54 | lance</small>
 */
@Data
@SuppressWarnings("serial")
@TableName("jz_chapter")
//这是的这里继承的基础服务类，有几个基本字段
public class ChapterDO implements Serializable {
    @TableId
    private Long id;

    @ApiModelProperty(value = "章节名")
    @TableField("name")
    private String name;

    /** 知识点名，虚拟字段 */
    @TableField(exist = false)
    private String kpointsName;

    @ApiModelProperty(value = "知识点id")
    @TableField("kpoints_id")
    private Long kpointsId;

    /** 课程名，虚拟字段 */
    @TableField(exist = false)
    private String coursesName;

    @ApiModelProperty(value = "资源id")
    @TableField("courses_id")
    private Long coursesId;

    @ApiModelProperty(value = "最短学习时长")
    @TableField("min_time")
    private Integer minTime;

    @ApiModelProperty(value = "内容描述")
    @TableField("introduce")
    private String introduce;

    @ApiModelProperty(value = "状态（0正常）")
    @TableField("state")
    private Integer state;

    @ApiModelProperty(value = "是否免费（0免费，1收费（默认收费））")
    @TableField("is_free")
    private Integer isFree;

    @ApiModelProperty(value = "是否为章节根节点 0否 1是")
    @TableField("is_root")
    private Integer isRoot;

    @ApiModelProperty(value = "父章节id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "章节层级")
    @TableField("level")
    private Integer level;

    @ApiModelProperty(value = "默认为0，逻辑删除为1")
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "章节优先级，默认根据日期排序")
    @TableField("sort")
    private Integer sort;


    @ApiModelProperty(value = "创建人id ")
    @TableField("creater_id")
    private Long createrId;

    @ApiModelProperty(value = "创建时间 ")
    @TableField("creater_date")
    private Date createrDate;


    @ApiModelProperty(value = "修改人id ")
    @TableField("updater_id")
    private Long updaterId;

    @ApiModelProperty(value = "修改时间 ")
    @TableField("update_date")
    private Date updateDate;


    /** 是否有新增章节按钮 */
    @TableField(exist = false)
    private Integer addChapterBtn;

    /** 是否有子章节 */
    @TableField(exist = false)
    private Integer isHaveChildren;


    @ApiModelProperty(value = "章节文件集合")
    @TableField(exist = false)
    private List<ChapterDocument> chapterDocuments;


    @ApiModelProperty(value = "下级目录集合")
    @TableField(exist = false)
    private List<ChapterDO> chapterDOS;

}
